{include file="header.html"}
<script type="text/javascript">
    $(function () {
        $('#not_before').datepicker({dateFormat: 'yy-mm-dd'});
        $('#not_after').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>
<div id="rightTop">
    <p>{$lang.coupon}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
        <li><a class="btn1" href="index.php?app=coupon_codes&amp;act=add">{$lang.add}</a></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="coupon_codes"/>
                <input type="hidden" name="act" value="index"/>
                {$lang.store_name}:
                <input class="queryInput" type="text" name="store_name" value="{$smarty.get.store_name|escape}"/>
                {$lang.not_before}:<input class="queryInput" type="text" value="{$query.not_before}" id="not_before" name="not_before" class="pick_date"/>
                {$lang.not_after}:<input class="queryInput" type="text" value="{$query.not_after}" id="not_after" name="not_after" class="pick_date"/>
                <input type="submit" class="formbtn" value="{$lang.query}"/>
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1"
               href="index.php?app=coupon_codes<!--{if $smarty.get.wait_verify}-->&amp;wait_verify={$smarty.get.wait_verify}<!--{/if}-->">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">{include file=page.top.html}</div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $coupon_codes_list}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall"/></td>
            <td class="table-center">{$lang.name}</td>
            <td class="table-center"><span ectype="order_by" fieldname="store_name">{$lang.type}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="store_name">{$lang.description}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="store_name">{$lang.store_name}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="coupon_value">{$lang.value}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="min_amount">{$lang.min_amount}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="not_before">{$lang.not_before}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="not_after">{$lang.not_after}</span></td>
            <!--<td class="table-center"><span ectype="order_by" fieldname="not_after">{$lang.storestock_name}</span></td>-->
            <td class="handler">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$coupon_codes_list item=coupon}-->
        <tr class="tatr2">
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$coupon.coupon_id}"/></td>
            <td class="table-center">{$coupon.name|escape}</td>
            <td class="table-center">{$coupon.type|escape}</td>
            <td class="table-center">{$coupon.description|escape}</td>
            <td class="table-center">{$coupon.store_name|escape}</td>
            <td class="table-center">{$coupon.value|escape}</td>
            <td class="table-center">{$coupon.min_amount|escape}</td>
            <td class="table-center">{$coupon.not_before}</td>
            <td class="table-center">{$coupon.not_after}</td>
            <!--<td class="table-center">{$coupon.storestock_name}</td>-->
            <td class="handler">
                <a href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=coupon_codes&amp;act=drop&amp;id={$coupon.id}');">{$lang.drop}</a>
                <a href="index.php?app=coupon_codes&amp;act=view&amp;id={$coupon.id}"
                   >{$lang.view}</a>
                <a href="index.php?app=coupon_codes&amp;act=edit&amp;id={$coupon.id}"
                  >{$lang.edit}</a>
            </td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="12">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $coupon_codes_list}-->
    <div id="dataFuncs">
        <div class="pageLinks">{include file=page.bottom.html}</div>
    </div>
    <div class="clear"></div>
    <!--{/if}-->

</div>
{include file="footer.html"}